package com.sinog.front.controller.biz;

import com.sinog.core.model.UserDTO;
import com.sinog.core.utilbean.Result;
import com.sinog.front.feign.biz.PrisonerTsService;
import com.sinog.front.service.user.UserFacade;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

/**
 * @desc 预安置管理 - 预释放人员核查 - 办理
 * @author wangxj
 * @date  2022/9/3 11:11
 */
@RestController
public class PrisonerTsController {

    @Resource
    private PrisonerTsService prisonerTsService;
    @Resource
    private UserFacade userFacade;

    /**
     * 根据核查id获取推送信息
     * @param id 核查信息编号
     * @return Result
     */
    @RequestMapping("/azbj/ts/searchBaseInfoByPriNum")
    public Result searchBaseInfo(@RequestParam("id") String id){
        UserDTO authentication = userFacade.getAuthentication();
        return prisonerTsService.searchBaseInfoByPriNum(id,authentication);
    }

    /**
     * 根据推送id获取推送信息
     * @param id 推送编号
     * @return Result
     */
    @RequestMapping("/azbj/ts/searchBaseInfoById")
    public Result searchBaseInfoById(@RequestParam("id") String id){
        return prisonerTsService.searchBaseInfoById(id);
    }
}
